﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace YXShop.Web.admin.templates.lable
{
    public partial class productclass_parameter : System.Web.UI.Page
    {
        public string level = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            loadClass();
            level = "一级";
            YXShop.Common.SysParameter sp = new YXShop.Common.SysParameter();
            this.txtProductClass.Attributes.Add("readonly", "readonly");
            this.txtProductClass.Attributes.Add("onclick", "selectFile('productclassone',new Array(" + this.hfcid.ClientID + "," + this.txtProductClass.ClientID + "),310,450,'" + sp.DummyPaht + "');");
        }
        /// <summary>
        /// 绑定排序字段
        /// </summary>
        private void loadClass()
        {
            ChangeHope.DataBase.DataHelper dh = new ChangeHope.DataBase.DataHelper();
            DataTable dt = dh.GetDataTable("yxs_productclass");
            ddl_CField.DataSource = dt;
            ddl_CField.DataTextField = dt.Columns["col"].ToString();
            ddl_CField.DataValueField = dt.Columns["col"].ToString();
            ddl_CField.DataBind();
        }

        protected void ddl_Showlevel_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ddl_Showlevel.SelectedValue == "1")
            {
                level = "一级";
                tb_TowCharacter.Text = "";
                tb_TowShoeColumns.Text = "";
                tb_TowShowRows.Text = "";
                tb_one.Visible = true;
                Table1.Visible = false;

            }
            if (ddl_Showlevel.SelectedValue == "2")
            {
                level = "二级";
                tb_one.Visible = true;
                Table1.Visible = true;

                tb_StairCharacter.Text = "6";
                tb_StairShoeColumns.Text = "2";
                tb_StairShowRows.Text = "5";
                tb_TowCharacter.Text = "6";
                tb_TowShoeColumns.Text = "2";
                tb_TowShowRows.Text = "5";
            }
        }
    }
}
